﻿<%@ Page Title="Control de Obsequios" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmControlObsequios.aspx.cs" Inherits="Crosland.Automotriz.Web.Vehiculos.wFrmControlObsequios" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

<script type="text/javascript">
    function MostrarAlerta() {
        popupEntrega.Show();
    }
</script>


    <div class="main-header" style="width:100%;">
        <div class="main-titulo" style="text-align: left">
            Control Entrega de Obsequios Torito Tonero</div>
    </div>

    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
    <ContentTemplate>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
            AssociatedUpdatePanelID="UpdatePanel2" DisplayAfter="0">
        <ProgressTemplate>
        
            <img src="../Images/loading2.gif" 
    style="width: 48px; height: 48px" />
        
        </ProgressTemplate>
        </asp:UpdateProgress>

    <div style="padding: 10px">
    <table width="100%">
        <tr>
            <td width="110">
                <dx:ASPxButton ID="btnEditar" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Entregar" 
                    Width="100px" onclick="btnEditar_Click">
                    <Image Url="~/Images/landscape.gif">
                    </Image>
                </dx:ASPxButton>
            </td>
            <td width="105">
                <dx:ASPxButton ID="btnModificar" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" onclick="btnModificar_Click" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Editar" 
                    Width="100px">
                    <Image Url="~/Images/edit2.gif">
                    </Image>
                </dx:ASPxButton>
            </td>
            <td>
                <dx:ASPxButton ID="btnSalir" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                    Width="100px" AutoPostBack="False">
                    <ClientSideEvents Click="function(s, e) {
	window.location = &quot;./wFrmControlObsequiosAgrupado.aspx?id=3&quot;;
}" />
                    <Image Url="~/Images/logout.png">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <hr />
            </td>
        </tr>
    </table>
    <table width="100%">
        <tr>
            <td style="width: 45px">
                <asp:Label ID="Label8" runat="server" ForeColor="Black" Text="Oferta:"></asp:Label>
            </td>
            <td width="205">
                <dx:ASPxComboBox ID="cboOferta" runat="server" AutoPostBack="True" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    onselectedindexchanged="cboOferta_SelectedIndexChanged" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Width="200px" Enabled="False">
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <DropDownButton Width="20px">
                    </DropDownButton>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxComboBox>
            </td>
            <td style="width: 80px">
                <asp:Label ID="Label1" runat="server" ForeColor="Black" Text="Fecha Inicio:"></asp:Label>
            </td>
            <td style="width: 90px">
                <asp:Label ID="lblFechaInicio" runat="server" Font-Bold="True" 
                    ForeColor="Black"></asp:Label>
            </td>
            <td style="width: 67px">
                <asp:Label ID="Label7" runat="server" ForeColor="Black" Text="Fecha Fin:"></asp:Label>
            </td>
            <td style="width: 90px">
                <asp:Label ID="lblFechaFinal" runat="server" Font-Bold="True" ForeColor="Black"></asp:Label>
            </td>
            <td>
                <dx:ASPxButton ID="btnConsultar" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" onclick="btnConsultar_Click" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Consultar">
                    <Image Url="~/Images/search.png">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
        </table>
    <dx:ASPxGridView ID="gv" runat="server" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" Width="100%" AutoGenerateColumns="False" 
            KeyFieldName="ID">
        <Columns>
            <dx:GridViewDataTextColumn Caption="Distribuidor" FieldName="DES_CLIENTE" 
                VisibleIndex="0">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Vin" FieldName="NRO_VIN" 
                VisibleIndex="1" Width="150px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Motor" FieldName="NRO_MOTOR" 
                VisibleIndex="7" Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Folio" FieldName="NRO_FOLIO" 
                VisibleIndex="2" Width="130px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Fecha Factura" FieldName="FEC_FACTURA" 
                VisibleIndex="3" Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Tipo Torito" FieldName="DES_LARGA" 
                VisibleIndex="6" Width="90px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Fecha Entrega" FieldName="FEC_ENTREGA" 
                VisibleIndex="4" Width="100px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Importe S/. (Inc. IGV.)" 
                FieldName="IMP_VVTA_SOLES" VisibleIndex="8" Width="120px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Comentario" FieldName="DES_COMENTARIO" 
                VisibleIndex="5">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Cod. Material" FieldName="cod_material" 
                VisibleIndex="9">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsBehavior AllowDragDrop="False" AllowFocusedRow="True" 
            AllowGroup="False" AllowSelectByRowClick="True" 
            AllowSelectSingleRowOnly="True" />
        <SettingsPager PageSize="17">
        </SettingsPager>
        <Settings ShowFilterRow="True" />
        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesPager>
            <PageNumber ForeColor="#3E4846">
            </PageNumber>
            <Summary ForeColor="#1E395B">
            </Summary>
        </StylesPager>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
        <dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" AllowDragging="True" 
            ClientInstanceName="popupEntrega" CloseAction="CloseButton" 
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" EnableHotTrack="False" HeaderText="Entrega" 
            Modal="True" PopupHorizontalAlign="WindowCenter" 
            PopupVerticalAlign="WindowCenter" 
            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
            Width="400px" ClientIDMode="Static">
            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
            </LoadingPanelImage>
            <HeaderStyle>
            <Paddings PaddingLeft="7px" />
            </HeaderStyle>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table width="100%">
        <tr>
            <td style="width: 111px">
                <asp:Label ID="Label6" runat="server" Text="Fecha de Entrega:"></asp:Label>
            </td>
            <td>
                <dx:ASPxDateEdit ID="deFechaEntrega" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Spacing="0" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100px">
                    <CalendarProperties>
                        <HeaderStyle Spacing="1px" />
                    </CalendarProperties>
                    <ButtonStyle Width="20px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxDateEdit>
            </td>
        </tr>
        <tr>
            <td style="width: 111px">
                <asp:Label ID="Label5" runat="server" ForeColor="Black" Text="Observaciones:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtObs" runat="server" Height="60px" TextMode="MultiLine" 
                    Width="240px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 111px">
                &nbsp;</td>
            <td>
                <dx:ASPxButton ID="btnGrabar" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Grabar" 
                    Width="100px" OnClick="btnGrabar_Click">
                    <ClientSideEvents Click="function(s, e) {
	e.processOnServer = confirm('¿Desea guardar los datos?');
}" />
                    <Image Url="~/Images/save_16.gif">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
                </dx:PopupControlContentControl>
</ContentCollection>
        </dx:ASPxPopupControl>
    </div>


    </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
